#ifndef __TDP2_RENDERDEVICE_HPP__
#define __TDP2_RENDERDEVICE_HPP__

#include "tdp2.hpp"
#include "tdp2_visualresources_enums.hpp"
#include "tdp2_visualresources.hpp"

namespace TDP
{
	namespace Rendering
	{
		enum TextureFlags
		{
			TXF_sRGB		= 1,
			TXF_AutoMipMap	= 2,
		};

		struct IRenderDevice
		{
			virtual bool CreateTexture(Resources::TextureSpec::TextureFormat tf, Resources::TextureSpec::TextureLayout tl, UInt32 numMipMaps,
				UInt32 width, UInt32 height, UInt32 depth, UInt32 flags, RenderTextureHandle *outRTH) = 0;
			virtual void UploadTextureRows(RenderTextureHandle rth, UInt32 level, UInt32 side, UInt32 y, UInt32 layer, UInt32 numRows, const void *data, LargeUInt numBytes) = 0;
			virtual void UploadTextureSubRow(RenderTextureHandle rth, UInt32 level, UInt32 side, UInt32 x, UInt32 y, UInt32 layer, UInt32 width, const void *data, LargeUInt numBytes) = 0;
			virtual void SetTextureMinLOD(RenderTextureHandle rth, UInt32 level) = 0;
			virtual void SetTextureMaxLOD(RenderTextureHandle rth, UInt32 level) = 0;

			virtual bool CreateShader(Resources::ShaderSpec::ShaderType shaderType, const void *data, LargeUInt sizeBytes, RenderShaderHandle *outRSH) = 0;
			virtual void DestroyShader(RenderShaderHandle rsh) = 0;

			virtual bool DestroyTexture(RenderTextureHandle rth) = 0;
			virtual ~IRenderDevice() = 0;
		};
	}
}

#endif
